package cn.stylefeng.guns.modular.business.app.controller;

import cn.stylefeng.guns.modular.business.app.service.ApiPayCallBackService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * 支付成功后回调接口
 */
@RestController
public class ApiPayCallBackController {

    @Autowired
    private ApiPayCallBackService apiPayCallBackService;

    //该回调接口可能会被调用多次，需要做好幂等处理
    @RequestMapping("/api/asyncMessageHand")
    public String handler(HttpServletRequest request) {
        return apiPayCallBackService.handler(request);
    }
}
